home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / video / security / movie.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.3 KB  |  90 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef _MOVIE_H
  18. #define _MOVIE_H
  19.  
  20. #include <movie.h>
  21. #include "audio.h"
  22.  
  23. class Movie
  24. {
  25.  public:
  26.   Movie();
  27.   virtual ~Movie();
  28.  
  29.   int getHeight() {return _height;}
  30.   int getWidth() {return _width;} 
  31.   double getRate() {return _rate;} 
  32.   int getFrameSize() {return _frameSize;}
  33.   long getImageID(){ return _imageID; }
  34.   void setImageID(MVid);
  35.   long getMovieID(){ return _movieID; }
  36.   void setMovieID(MVid);
  37.   long getAudioID(){ return _audioID; }
  38.   void setAudioID(MVid);
  39.   MVframe getNumAudio() { return _numAudio;} 
  40.   void setNumAudio(MVframe a) { _numAudio = a;} 
  41.   MVframe getNumFrames() {return _numFrames;} 
  42.   void setNumFrames(MVframe n) { _numFrames = n;} 
  43.   void *getFrame(int);
  44.   int setFrame(MVframe, void *);
  45.   int setMovie(const char *name);
  46.   char *getName();
  47.   char *getCompressionType();
  48.   void addAudio(Audio *);
  49.   void startFrame() { _currentFrame = 0;} 
  50.   
  51.  protected:
  52.   MVid _movieID;
  53.   MVid _imageID;
  54.   MVid _audioID;
  55.   
  56.   int _width;
  57.   int _height;
  58.   int _currentFrame;
  59.   int _optimizeMovie;
  60.   double _rate;
  61.   MVframe _numFrames;
  62.   int _frameSize;
  63.   char *_movieName;
  64.   MVframe _numAudio;
  65.   char *_compressType;
  66. };
  67.  
  68. class NewMovie : public Movie
  69. {
  70.  public:
  71.   
  72.   NewMovie(const char *name, double rate = 4.0, 
  73.        int w = 320, int h = 240, 
  74.        const char *c = "MVC1"  );
  75.   NewMovie(Movie *, const char *);
  76.   ~NewMovie();
  77.   void nextFrame(void *buf) {setFrame(_currentFrame++, buf);} 
  78. };
  79.  
  80. class OldMovie : public Movie
  81. {
  82.  public:
  83.   
  84.   OldMovie(const char *name);
  85.   ~OldMovie();
  86.   void nextFrame(void *buf) {buf = getFrame(_currentFrame++);} 
  87. };  
  88.  
  89. #endif
  90.